package util

import (
	"fmt"
	"math/rand"
	"os"
	"regexp"
	"time"
)

// IsMobile 识别手机号码
func IsMobile(mobile string) bool {
	result, _ := regexp.MatchString(`^(1[3|4|5|7|8][0-9]\d{4,8})$`, mobile)
	if result {
		return true
	} else {
		return false
	}
}


func OrderNo(prefix string)string{
	set := ""
	rand.Seed(time.Now().Unix())
	set += fmt.Sprintf("%v%v%v%v",prefix,time.Now().Unix(),os.Getppid(),rand.Intn(10))
	return set
}





